package com.tust.service.impl;

import com.tust.dao.UserDao;
import com.tust.domain.User;
import com.tust.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public int deleteUser(String userName) {
        return userDao.deleteUser(userName);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public List<User> selectUserByUserName(String userName) {
        return userDao.selectUserByUserName(userName);
    }

    @Override
    public List<User> selectUserByPassword(String password) {
        return userDao.selectUserByPassword(password);
    }

    @Override
    public List<User> selectUserAll() {
        return userDao.selectUserAll();
    }
}
